#ifndef MPTHREAD_H
#define MPTHREAD_H

#include<iostream>
#include<unistd.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<event.h>
#include<map>
#include<vector>
#include<pthread.h>
#include<stdlib.h>
using namespace std;

typedef class mpthread
{
	public:
		mpthread(int sock_1);
		~mpthread(){ cout<<"~mpthread()"<<endl;}
		

	private:
		friend void* run(void *arg);
		friend void cli_cb(int fd,short event,void *arg);
		friend void sock_1_cb(int fd,short event,void *arg);
		
		pthread_t pthread_id;
		int _sock_1;
		struct event_base* _base;
		map<int,struct event*> _event_map;

}Mpthread,*Pmpthread;

#endif